package Assignment1;
import java.util.Comparator;
public class NumberofitiesComparator implements Comparator<Province>,java.io.Serializable{
    public int compare(Province o1, Province o2) {
        int area1 = o1.getNum();
        int area2 = o2.getNum();
        if (area1 < area2) {
            return -1;
        }else if (area1 == area2) {
            return 0;
        }else {
            return 1;
        }
    }
}
